package za.org.jcicada.cfgmngr;

import za.org.jcicada.genss.SystemURN;
import za.org.jcicada.genss.messages.Result;

public interface ISystemObserver {

	public enum Event {
		REGISTERED, DEREGISTERED
	};

	/**
	 * Called after attaching to a list of sensors using
	 * IConfigurationSubject.attach().
	 */
	void replyAttach(Result result);

	/**
	 * Called after detaching from a list of sensors using
	 * IConfigurationSubject.detach().
	 */
	void replyDetach(Result result);

	/**
	 * Handle informs about system registration events
	 * 
	 * @param systemURN
	 *            the URN of a newly registered system
	 * @param type
	 *            the type of event
	 * @param event
	 *            has the system registered or deregistered
	 */
	void informSystemEvent(SystemURN systemURN, SystemSetType type, Event event);

	/**
	 * Notify the observer that it has been disconnected from the subject
	 */
	void informDisconnect();

}
